package com.yjkf.zh.test.thread;

public class MyThread {

    public static void main(String[] args) {
        ThreadDemo threadDemo = new ThreadDemo("A");
        ThreadDemo threadDemo1 = new ThreadDemo("B");
        ThreadDemo threadDemo2 = new ThreadDemo("C");

            threadDemo.start();
            threadDemo1.start();
            threadDemo2.start();

        }

}

class ThreadDemo extends Thread{

    private String name;

    public ThreadDemo(String name){
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0;i<10;i++) {
            System.out.println(this.name + "多线程启动...");
        }
    }
}
